import * as CoreEnums from '@core/engine/Enums';

export const REMOTE_DATE_FORMATTER = 'YYYY/MM/DD HH:mm:ss';

export const FirewallState = {
  Normal: 'normal',
  Overdue: 'overdue',
  Unsubscribe: 'unsubscribe',
};

// IP协议版本
export const IpVersion = {
  V4: '1',
  V6: '2',
};

// 动作
export const AccessControlAction = {
  All: CoreEnums.FILTER_ALL,
  Pass: '1',
  Drop: '2',
};

// 协议
export const AccessProtocol = {
  All: CoreEnums.FILTER_ALL,
  ICMP: '1',
  TCP: '6',
  UDP: '17',
  ICMP_V6: '58',
};

// 来源
export const LogOrigin = {
  All: CoreEnums.FILTER_ALL,
  BasicDefense: '1',
  VirtualPatch: '2',
};

// 方向
export const NetworkDirection = {
  All: CoreEnums.FILTER_ALL,
  InToOut: '1',
  OutToIn: '2',
};

// 事件等级
export const ActionLevel = {
  All: CoreEnums.FILTER_ALL,
  High: '高危',
  Middle: '中危',
  Low: '低危',
};

export const ProtectionIpCountSteps = [20, 250, 500, 750, 1000];
export const FlowCapacitySteps = [10, 500, 1000, 1500, 2000];

export const FirewallEdition = {
  Advanced: 'AdvancedEdition',
};

export const ORDER_SERVICE_TAG = 'CFW';

export const OrderResourceType = {
  Master: 'CFW_VERSION',
  Bandwidth: 'CFW_BANDWIDTHEXPAND',
  Ip: 'CFW_IPEXPAND',
};

export const {
  FILTER_ALL,
  FILTER_EMPTY,
  MONTHS_PRE_YEAR,
  RequestBoolean,
  OrderCycleType,
  LogJudgeMode,
} = CoreEnums;
